import request from '@/utils/request'
export function fetchList(params) {
    return request({
        url: '/policy/list',
        method: 'get',
        params: params
    })
}
export function updateStatus(id, params) {
    return request({
        url: '/policy/update/status/' + id,
        method: 'post',
        params: params
    })
}
export function deletePolicy(data) {
    return request({
        url: '/policy/delete',
        method: 'post',
        data: data
    })
}
export function createPolicy(data) {
    return request({
        url: '/policy/create',
        method: 'post',
        data: data
    })
}
export function getPolicy(id) {
    return request({
        url: '/policy/' + id,
        method: 'get',
    })
}

export function updatePolicy(id, data) {
    return request({
        url: '/policy/update/' + id,
        method: 'post',
        data: data
    })
}